package com.example.king.ffmpegexample;

public class NativeH264ToRgb {

    static {
        System.loadLibrary("avcodec-57");
        System.loadLibrary("avdevice-57");
        System.loadLibrary("avfilter-6");
        System.loadLibrary("avformat-57");
        System.loadLibrary("avutil-55");
        System.loadLibrary("postproc-54");
        System.loadLibrary("swresample-2");
        System.loadLibrary("swscale-4");
        System.loadLibrary("h264androidtorgb");
    }

    public NativeH264ToRgb(String outputFilePath, boolean render) {
        init(outputFilePath, render);
    }

    public native void init(String outputFilePath, boolean render);

    public native int decodeH264ToRgb(byte[] in, int len, byte[] out);

    public native void release();

}
